raar.process.sensor
Class RAObjectSensor
java.lang.Object
raar.process.RAProcess
raar.process.sensor.RASensor
raar.process.sensor.RARegionSensor
raar.process.sensor.RARegionSensor_Pie
raar.process.sensor.RAObjectSensor
- All Implemented Interfaces:
- java.io.Serializable
- public class RAObjectSensor
- extends RARegionSensor_Pie
A sensor with a response to objects of a certain class within a pie-piece-
shaped region. Returns the distance to the nearest object of a certain class,
relative to the radius of the pie.
- See Also:
- Serialized Form
|
Method Summary |
java.lang.String |
explain()
Explain what the sensor does. |
java.lang.String |
getClassName()
Get class name. |
java.awt.Color |
getColor()
Get color. |
void |
setClassName(java.lang.String className)
Set class name. |
java.lang.String |
toString()
String representation. |
| Methods inherited from class raar.process.sensor.RASensor |
acceptsInput, dumpRegisters, execute, get, getAgent, getDataType, getInputNames, getInputObjects, getOutputNames, getOutputObjects, getSensorValue, isSpecial, set, setAgent, setOutput, setSourceCode, suppliesOutput |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
RAObjectSensor
public RAObjectSensor(RAAgent agent)
- Construct the sensor.
setClassName
public void setClassName(java.lang.String className)
- Set class name.
getClassName
public java.lang.String getClassName()
- Get class name.
getColor
public java.awt.Color getColor()
- Get color.
- Overrides:
getColor in class RASensor
toString
public java.lang.String toString()
- String representation.
- Specified by:
toString in class RASensor
explain
public java.lang.String explain()
- Explain what the sensor does.
- Specified by:
explain in class RASensor